package jsyf.oa.entity.device;


import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.fastjson.JSONObject;
/**
 * Created by y on 2018/6/28.
 */
@Entity
@Table(name = "T_DVC_OUTBOUND", schema = "oa", catalog = "")
public class DeviceOutBoundMainEntity extends BaseEntity {
    private String sampleId;
    private String trafficDestination;
    private String trafficStarting;
    private String transport_company;
    private String contacts;
    private String telephone;
    private String dray_license;
    private String driver_name;
    private String driver_tel;
    private BigDecimal special_fee;
    private BigDecimal deduction_fee;
    private String deduction_remark;
    private String reason;
    private Integer type;
    private String pickUpAddress;//提车地址
    private String pickUpContacts;//联系人
    private String pickUpTelephone;//电话
    private String delivery_address;
    private String deliveryContacts;
    private String deliveryTelephone;
    private String remark;
    private Date createTime;
    private Date updateTime;
    private String contractId;
    private String transportStartTime;
    private String transportEndTime;
    private String createUserId;
    private String createUserName;

    private String contractNo;
    private String salespersonId;
    private String salespersonName;
    private String deliveryCustomerName;
    private String deliveryCustomerTel;

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }

    public String getSalespersonId() {
        return salespersonId;
    }

    public void setSalespersonId(String salespersonId) {
        this.salespersonId = salespersonId;
    }

    public String getSalespersonName() {
        return salespersonName;
    }

    public void setSalespersonName(String salespersonName) {
        this.salespersonName = salespersonName;
    }

    public String getDeliveryCustomerName() {
        return deliveryCustomerName;
    }

    public void setDeliveryCustomerName(String deliveryCustomerName) {
        this.deliveryCustomerName = deliveryCustomerName;
    }

    public String getDeliveryCustomerTel() {
        return deliveryCustomerTel;
    }

    public void setDeliveryCustomerTel(String deliveryCustomerTel) {
        this.deliveryCustomerTel = deliveryCustomerTel;
    }

    public String getSampleId() {
        return sampleId;
    }

    public void setSampleId(String sampleId) {
        this.sampleId = sampleId;
    }

    public String getTrafficDestination() {
        return trafficDestination;
    }

    public void setTrafficDestination(String trafficDestination) {
        this.trafficDestination = trafficDestination;
    }

    public String getTrafficStarting() {
        return trafficStarting;
    }

    public void setTrafficStarting(String trafficStarting) {
        this.trafficStarting = trafficStarting;
    }

    public String getTransport_company() {
        return transport_company;
    }

    public void setTransport_company(String transport_company) {
        this.transport_company = transport_company;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getDray_license() {
        return dray_license;
    }

    public void setDray_license(String dray_license) {
        this.dray_license = dray_license;
    }

    public String getDriver_name() {
        return driver_name;
    }

    public void setDriver_name(String driver_name) {
        this.driver_name = driver_name;
    }

    public String getDriver_tel() {
        return driver_tel;
    }

    public void setDriver_tel(String driver_tel) {
        this.driver_tel = driver_tel;
    }

    public BigDecimal getSpecial_fee() {
        return special_fee;
    }

    public void setSpecial_fee(BigDecimal special_fee) {
        this.special_fee = special_fee;
    }

    public BigDecimal getDeduction_fee() {
        return deduction_fee;
    }

    public void setDeduction_fee(BigDecimal deduction_fee) {
        this.deduction_fee = deduction_fee;
    }

    public String getDeduction_remark() {
        return deduction_remark;
    }

    public void setDeduction_remark(String deduction_remark) {
        this.deduction_remark = deduction_remark;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPickUpAddress() {
        return pickUpAddress;
    }

    public void setPickUpAddress(String pickUpAddress) {
        this.pickUpAddress = pickUpAddress;
    }

    public String getPickUpContacts() {
        return pickUpContacts;
    }

    public void setPickUpContacts(String pickUpContacts) {
        this.pickUpContacts = pickUpContacts;
    }

    public String getPickUpTelephone() {
        return pickUpTelephone;
    }

    public void setPickUpTelephone(String pickUpTelephone) {
        this.pickUpTelephone = pickUpTelephone;
    }

    public String getDelivery_address() {
        return delivery_address;
    }

    public void setDelivery_address(String delivery_address) {
        this.delivery_address = delivery_address;
    }

    public String getDeliveryContacts() {
        return deliveryContacts;
    }

    public void setDeliveryContacts(String deliveryContacts) {
        this.deliveryContacts = deliveryContacts;
    }

    public String getDeliveryTelephone() {
        return deliveryTelephone;
    }

    public void setDeliveryTelephone(String deliveryTelephone) {
        this.deliveryTelephone = deliveryTelephone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getTransportStartTime() {
        return transportStartTime;
    }

    public void setTransportStartTime(String transportStartTime) {
        this.transportStartTime = transportStartTime;
    }

    public String getTransportEndTime() {
        return transportEndTime;
    }

    public void setTransportEndTime(String transportEndTime) {
        this.transportEndTime = transportEndTime;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("SAMPLE_ID",this.getSampleId());
        obj.put("TRAFFIC_STARTING", this.getTrafficStarting());
        obj.put("TRAFFIC_DESTINATION", this.getTrafficDestination());
        obj.put("TRANSPORT_COMPANY", this.getTransport_company());
        obj.put("CONTACTS", this.getContacts());
        obj.put("TELEPHONE", this.getTelephone());
        obj.put("DRAY_LICENSE", this.getDray_license());
        obj.put("DRIVER_NAME", this.getDriver_name());
        obj.put("DRIVER_TEL", this.getDriver_tel());
        obj.put("SPECIAL_FEE", this.getSpecial_fee());
        obj.put("DEDUCTION_FEE", this.getDeduction_fee());
        obj.put("DEDUCTION_REMARK", this.getDeduction_remark());
        obj.put("REASEON", this.getReason());
        obj.put("TYPE",this.getType());
        obj.put("PICK_UP_ADDRESS",this.getPickUpAddress());
        obj.put("PICK_UP_CONTACTS",this.getPickUpContacts());
        obj.put("PICK_UP_TELEPHONE",this.getPickUpTelephone());
        obj.put("DELIVERY_ADDRESS",this.getDelivery_address());
        obj.put("DELIVERY_CONTACTS",this.getDeliveryContacts());
        obj.put("DELIVERY_TELEPHONE",this.getDeliveryTelephone());
        obj.put("REMARK",this.getRemark());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("UPDATE_TIME", getUpdateTime());
        obj.put("CONTRACT_ID", this.getContractId());
        obj.put("TRANSPORT_START_TIME", this.getTransportStartTime());
        obj.put("TRANSPORT_END_TIME", this.getTransportEndTime());
        obj.put("CREATE_USER_ID", this.getCreateUserId());
        obj.put("CREATE_USER_NAME", this.getCreateUserName());
        obj.put("SALESPERSON_ID", this.getSalespersonId());
        obj.put("SALESPERSON_NAME", this.getSalespersonName());
        obj.put("DELIVERY_CUSTOMER_NAME", this.getDeliveryCustomerName());
        obj.put("DELIVERY_CUSTOMER_TEL", this.getDeliveryCustomerTel());
        obj.put("CONTRACT_NO", this.getContractNo());
        return obj;
    }
    @Override
    public String getTableName() {
        return "T_DVC_OUTBOUND";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("SAMPLE_ID","sampleId");
        obj.put("TRAFFIC_STARTING", "trafficStarting");
        obj.put("TRAFFIC_DESTINATION", "trafficDestination");
        obj.put("TRANSPORT_COMPANY","transport_company");
        obj.put("CONTACTS", "contacts");
        obj.put("TELEPHONE", "telephone");
        obj.put("DRAY_LICENSE", "dray_license");
        obj.put("DRIVER_NAME", "driver_name");
        obj.put("DRIVER_TEL", "driver_tel");
        obj.put("SPECIAL_FEE", "special_fee");
        obj.put("DEDUCTION_FEE", "deduction_fee");
        obj.put("DEDUCTION_REMARK", "deduction_remark");
        obj.put("REASEON", "reason");
        obj.put("TYPE","type");
        obj.put("PICK_UP_ADDRESS","pickUpAddress");
        obj.put("PICK_UP_CONTACTS","pickUpContacts");
        obj.put("PICK_UP_TELEPHONE","pickUpTelephone");
        obj.put("DELIVERY_ADDRESS","delivery_address");
        obj.put("DELIVERY_CONTACTS","deliveryContacts");
        obj.put("DELIVERY_TELEPHONE","deliveryTelephone");
        obj.put("REMARK","remark");
        obj.put("CREATE_TIME", "createTime");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("CONTRACT_ID", "contractId");
        obj.put("TRANSPORT_START_TIME", "transportStartTime");
        obj.put("TRANSPORT_END_TIME", "transportEndTime");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("SALESPERSON_ID", "salespersonId");
        obj.put("SALESPERSON_NAME", "salespersonName");
        obj.put("DELIVERY_CUSTOMER_NAME", "deliveryCustomerName");
        obj.put("DELIVERY_CUSTOMER_TEL", "deliveryCustomerTel");
        obj.put("CONTRACT_NO", "contractNo");
        return obj;
    }
}
